<template>
  <div class="boss">
    <head-page title="人才库" id="backstyle"></head-page>
    <Banner id="2" class="bannerId"></Banner>
    <div class="text title-center l-h">
      {{ this.$route.query.title }}
    </div>
    <div class="area-center title-center">
      <!-- 用户单位文字区域 -->
      <div class="umit">
        <div
          class="xiao flex aic m-t-07"
          v-for="(item, index) in list"
          :key="index"
          @click="person(index + 1, item.typeName, item.typeId)"
        >
          <div class="left">
            <div>{{ index + 1 }}.</div>
          </div>
          <div :class="['zhong']">
            {{ item.typeName }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { talType } from "@/api/index";
import Banner from "@/components/Home/BannerView.vue";
export default {
  data() {
    return {
      list: "",
    };
  },
  components: {
    Banner,
  },
  computed() {},
  mounted() {
    //要求id写为0
    talType("0").then((res) => {
      let data = res.data;
      if (data.code == 200) {
        this.list = data.rows;
      }
    });
  },
  methods: {
    person(index, title, Id) {
      if (Id == "0") {
        this.$router.push({ path: "/personfive", query: { index, title, Id } });
      } else {
        this.$router.push({ path: "personmin", query: { index, title, Id } });
      }
    },
  },
};
</script>

<style scoped>
/* 整体区域 */
.boss {
  width: 100%;
  height: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* 版心区域 */
.center {
  width: 98%;
  height: 100%;
}
.text {
  width: 100%;
  text-align: center;
}
.umit {
  width: 100%;
  min-height: 0.4rem;
}
.xiao {
  width: 100%;
  display: flex;
}
/* 左边区域 */
.xiao .left {
  width: 5%;
  height: 100%;
}

/* 中间区域 */
.zhong {
  display: inline-block;
  height: 100%;
  line-height: 0.3rem;
}
</style>